/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	RenderEntryRenderTarget.h
*
*	Description -	Render entry set render target ( and depth stencil buffer).
*
*	Comments	-	
*
*	Modification History:
*			Name			   Date					Description
*			MrCodeSushi	-	12/26/2012	-	Creation of this file
**************************************************************************************/
#ifndef _PSX_RENDER_ENTRY_RENDER_TARGET_H_
#define _PSX_RENDER_ENTRY_RENDER_TARGET_H_

#include "PulseSTD.h"
#include "GraphicsTypes.h"
#include "RenderEntry.h"
#include "GraphicsInfrastructure.h"

namespace Pulse
{
	class RenderEntryRenderTarget : public RenderEntry
	{
	public:

		RenderEntryRenderTarget( void );

		virtual ~RenderEntryRenderTarget ( void ) { }

		void SetDepthStencilBuffer( ShaderResource *pDepthStencil ) { m_pDepthStencil = pDepthStencil; }

		void SetRenderTarget( const UINT index, ShaderResource *pRenderTarget ) { m_pRenderTargets[index] = pRenderTarget; }

		void SetClearBuffers( BOOL bClear ) { m_bClearBuffers = bClear; }

		// Definition: Sets all values to null.
		void SetDefault( void );

		//virtual void PreExecute( GraphicsPipeline *pPipeline ) { }

		virtual void Execute( GraphicsPipeline *pPipeline );

		//virtual void PostExecute( GraphicsPipeline *pPipeline ) { }

	private:

		BOOL				m_bClearBuffers;

		ShaderResource		*m_pDepthStencil;
		ShaderResource		*m_pRenderTargets[PSX_NUM_RENDER_TARGET_SLOT];

	};

}

#endif /* _PSX_RENDER_ENTRY_RENDER_TARGET_H_ */